package com.iris.egrant;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhoukun
 * @since 2021-05-18
 */
@SpringBootApplication
@Slf4j
@RestController
public class LogApp {

    public static void main(String[] args) {
        SpringApplication.run(LogApp.class, args);
    }

    @GetMapping("/log")
    public String log() {
        log.trace("this is trace log.");
        log.debug("this is debug log.");
        log.info("this is info log.");
        log.warn("this is warn log.");
        log.error("this is error log.");
        return "已记录日志";
    }

}
